//
//  YHYBusinessViewController.m
//  Home
//
//  Created by 杨泓晔 on 16/6/21.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "YHYBusinessViewController.h"
#import "WUExpertFindViewCell.h"
@interface YHYBusinessViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,retain)UITableView *myTableView;
@property (nonatomic,retain)WSCustomButton *singin, *SSbution;
@property (nonatomic,strong)UIButton *shoBut, *expertBut;
@end

@implementation YHYBusinessViewController

- (void)viewWillAppear:(BOOL)animated {
    
    self.navigationController.navigationBarHidden = NO;
    self.navigationController.navigationBar.translucent = NO;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self creatView];
}

- (void)creatView{
    _expertBut = [UIButton new];
    [self.view addSubview:self.expertBut];
    _shoBut = [UIButton new];
    [self.view addSubview:self.shoBut];
    
    
    [self.expertBut setTitle:@"业主" forState:UIControlStateNormal];
    // [self.shoBut addTarget:self action:@selector(goNext:) forControlEvents:UIControlEventTouchUpInside];
    [self.expertBut setTitleColor:[UIColor colorWithWhite:0.000 alpha:0.580] forState:UIControlStateNormal];
    [self.expertBut mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0 * AUTO_HEIGHT);
        make.left.mas_equalTo(_shoBut.mas_right);
        make.right.mas_equalTo(self.view);
        make.height.mas_equalTo(40 * AUTO_HEIGHT);
        
    }];
  
    self.expertBut.titleLabel.font = [UIFont fontWithName:@"Arial" size:TEXTCONTENTFONT * TEXTWEIGHT];
    

    
    UIImageView *line = [UIImageView new];
    [self.view addSubview:line];
    line.image = [UIImage imageNamed:@"虚线竖"];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(5 * AUTO_HEIGHT);
        make.left.mas_equalTo(_expertBut.mas_left).offset(1);
        make.width.mas_equalTo(1.5 * AUTO_WIDTH);
        make.bottom.mas_equalTo(_expertBut.mas_bottom).offset(- 5 * AUTO_HEIGHT);
        
        
    }];
    
    
    
    
    
    
    
    [self.shoBut setTitle:@"设计师" forState:UIControlStateNormal];
   // [self.shoBut addTarget:self action:@selector(goNext:) forControlEvents:UIControlEventTouchUpInside];
    [self.shoBut setTitleColor:[UIColor colorWithWhite:0.000 alpha:0.580] forState:UIControlStateNormal];
    // [self.button setTitleColor:HS forState:UIControlStateNormal];
    //    self.button.frame = CGRectMake(50.00*AUTO_WIDTH, 600.00*AUTO_WIDTH, 275.00*AUTO_WIDTH, 40.00*AUTO_WIDTH);
    [self.shoBut mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0 * AUTO_HEIGHT);
        make.left.mas_equalTo(self.view);
        make.width.mas_equalTo(self.view.frame.size.width/2);
        //make.right.mas_equalTo(_expertBut.mas_left);
        make.height.mas_equalTo(40 * AUTO_HEIGHT);
        
    }];
    self.shoBut.titleLabel.font = [UIFont fontWithName:@"Arial" size:TEXTCONTENTFONT * TEXTWEIGHT];
    
    
    
    _myTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 40 * AUTO_HEIGHT, self.view.frame.size.width, self.view.frame.size.height-100*AUTO_HEIGHT)];
    _myTableView.backgroundColor = LV;
    _myTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    _myTableView.delegate = self;
    _myTableView.dataSource = self;
    [self.view addSubview:_myTableView];
   // [self.BigScrollView addSubview:_myTableView];
    
    
    
    
    [_myTableView registerClass:[WUExpertFindViewCell class] forCellReuseIdentifier:@"YHYFindViewCell"];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString *str = @"YHYFindViewCell";
    WUExpertFindViewCell *cell = [tableView dequeueReusableCellWithIdentifier:str forIndexPath:indexPath];
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    
    cell.myImageView.backgroundColor = [UIColor redColor];
    
    return cell;
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 750/3 * AUTO_HEIGHT;
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
